﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebSite.Core;

namespace WebSite
{
    public partial class AwardList : BasePage
    {
        public override bool NeedLogin
        {
            get
            {
                return false;
            }
        }

        public List<Maticsoft.Model.CarrefourCover.PrizeUserList> listWeiboAward = new List<Maticsoft.Model.CarrefourCover.PrizeUserList>();
        public List<Maticsoft.Model.CarrefourCover.PrizeUserList> listVoteAward = new List<Maticsoft.Model.CarrefourCover.PrizeUserList>();
        public List<Maticsoft.Model.CarrefourCover.Team> listTeam = new List<Maticsoft.Model.CarrefourCover.Team>();

        protected void Page_Load(object sender, EventArgs e)
        {
            Core.NavHelper.SetNavMenuSelectedIndex(4);

            Maticsoft.BLL.CarrefourCover.PrizeUserList bll = new Maticsoft.BLL.CarrefourCover.PrizeUserList();
            listWeiboAward = bll.GetModelList( "Type=1" ).OrderBy( p => p.OrderBy ).ToList();
            listVoteAward = bll.GetModelList( "Type=2" ).OrderBy( p => p.OrderBy ).ToList();

            Maticsoft.BLL.CarrefourCover.Team bllteam = new Maticsoft.BLL.CarrefourCover.Team();
            listTeam = bllteam.GetModelList( "Type>1" ).OrderByDescending(p=>p.OrderBy).ToList();
        }
    }
}